package swings.buttons;

import swings.panels.WorkPanel;
import utils.ImageUtils;

import javax.swing.*;

/**
 * @version V1.0
 * @Title: 新增param按钮，重写了构造方法
 * @Package
 * @Description:
 * @author: runoob
 * @date:
 */
public class AddParamButton extends JButton {

    /**
     * 快速构造方法，只需设定宽度
     */
    public AddParamButton(){
        int width = WorkPanel.width-20;
        this.setContentAreaFilled(false);
        this.setIcon(ImageUtils.add);
        this.setBorder(null);
        this.setBounds(0,0,width,30);
    }

    /**
     * 详细构造方法
     */
    public AddParamButton(int x,int y,int width,int height){
        this.setContentAreaFilled(false);
        this.setIcon(ImageUtils.add);
        this.setBorder(null);
        this.setBounds(x,y,width,height);
    }

}
